import { defineStore } from 'pinia'
interface IConfig {
  userInfo: IUserInfo
}
const useUserStore = defineStore('User', {
    state: (): IConfig => {
        return {
          userInfo: {
            uid: 0,
            nickname: '',
            avatar: '',
            tid: 0,
            store_id: 0,
            store_name: '',
            status: 0,
          }
        }
    },
    actions: {
      setUserInfo(value: IUserInfo) {
        this.userInfo = value
      },

      getUserInfo() {
        return this.userInfo
      }
    }
})

export default useUserStore
